   
<#if isInstantApp>
apply plugin: 'com.android.feature'
<#else>
  <#if isLibraryProject>
apply from: 'deploy.gradle'
apply plugin: 'com.android.library'
  <#elseif isDynamicFeature>
apply plugin: 'com.andorid.dynamic-feature'
  <#else>
apply from: 'deploy.gradle'
apply plugin: 'com.android.application'
  </#if>
</#if>
<#if generateKotlin>
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
</#if>

<#if generateKotlin>
kapt {
    arguments {
        arg("AROUTER_MODULE_NAME", project.getName())
    }
}

androidExtensions {
    experimental = true
}
</#if>

<#if useMikesProject>
  <#else>
<@shared.androidConfig hasApplicationId=isApplicationProject applicationId=packageName isBaseFeature=isBaseFeature hasTests=true canHaveCpp=true canUseProguard=isApplicationProject||isBaseFeature||(isLibraryProject&&!isInstantApp)/>
</#if>

dependencies {
    <#if isApplicationProject>
    //common-base
    ${getConfigurationName("compile")} rootProject.ext.deps.fastLib.common_base
    //pull to refresh
    ${getConfigurationName("compile")} rootProject.ext.deps.fastLib.pull_to_refresh
    //smart rv adapter
    ${getConfigurationName("compile")} rootProject.ext.deps.fastLib.smart_rv_adapter
    //bottom-bar
    ${getConfigurationName("compile")} rootProject.ext.deps.fastLib.bottombar
    //viewpager_indicator
    ${getConfigurationName("compile")} rootProject.ext.deps.fastLib.viewpager_indicator
    </#if>

    <#if !improvedTestDeps>
    ${getConfigurationName("androidTestCompile")}('com.android.support.test.espresso:espresso-core:${espressoVersion!"+"}', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    </#if>
    <#if generateKotlin>
      ${getConfigurationName("compile")} rootProject.ext.deps.kotlin.stdlib

      //butter knife
      ${getConfigurationName("compile")} (rootProject.ext.deps.butterknife.runtime) {
          exclude group: 'com.android.support'
      }
      kapt rootProject.ext.deps.butterknife.compiler

      //ARouter
      kapt rootProject.ext.deps.aRouter.compiler
    <#else>
      //butter knife
      ${getConfigurationName("compile")} (rootProject.ext.deps.butterknife.runtime) {
          exclude group: 'com.android.support'
      }
      annotationProcessor rootProject.ext.deps.butterknife.compiler
      //Arouter
      annotationProcessor rootProject.ext.deps.aRouter.compiler
    </#if>

    <#if isInstantApp||isDynamicFeature>
      <#if isBaseFeature>
        <#if monolithicModuleName?has_content>
        application project(':${monolithicModuleName}')
        <#else>
        // TODO: Add dependency to the main application.
        // application project(':app')
        </#if>
      <#else>
        implementation project(':${baseFeatureName}')
      </#if>
    <#else>
      <#if WearprojectName?has_content && NumberOfEnabledFormFactors?has_content && NumberOfEnabledFormFactors gt 1 && Wearincluded>
        wearApp project(':${WearprojectName}')
        ${getConfigurationName("compile")} 'com.google.android.gms:play-services-wearable:+'
      </#if>
    </#if>
}